package com.wei.frame.di.component;

import android.app.Application;

import androidx.annotation.Nullable;

import com.google.gson.Gson;
import com.wei.frame.di.module.AppModule;
import com.wei.frame.ui.imageloader.ImageLoader;
import com.wei.frame.utils.AppManager;

import javax.inject.Singleton;

import dagger.BindsInstance;
import dagger.Component;

/**
 * 作者：赵若位
 * 时间：2020/8/20 2:31
 * 邮箱：1070138445@qq.com
 * 功能：
 */
@Singleton
@Component(modules = AppModule.class)
public interface AppComponent {
    void inject(@Nullable Application application);

    //Gson
    Gson gson();

    //图片加载框架
    ImageLoader getImageLoader();

    AppManager getAppManager();


    @Component.Builder
    interface Builder {
        @BindsInstance
        AppComponent.Builder application(Application application);

        AppComponent build();
    }
}
